home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / May 90 / MacApp.Tech$ 5⁄11⁄90 / 1282-Link error⁄method st-May90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.4 KB  |  80 lines  |  [TEXT/GEOL]

  1. Item    2451862                         11-May-90        17:07PDT
  2.  
  3. From:   CHANDLER1                       Chandler, Dick
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    Link error/method stripping?
  8.  
  9.  
  10. I'm having a link problem with C++ and MacApp,
  11.  
  12. I am getting link errors on methods inside an object that I don't call.  I
  13. don't get link errors on methods inside the same object which I do call.
  14.  
  15. In fact if I make a call in my source code to a method I'm getting an error to,
  16. the error goes away.
  17.  
  18. I'm doing a if(gDeadStripSuppression) on the objects.
  19.  
  20. HELP! Is there something I'm missing or don't know???
  21.  
  22.  
  23.  
  24. I'VE DECLARED A GENERAL SERIAL PORT OBJECT:
  25.  
  26.  
  27. // ============================================================================
  28. // CLASS:  T S e r i a l P o r t
  29. //
  30. // FUNCTIONSerial Port object
  31. // ============================================================================
  32. class TSerialPort : public HandleObject
  33. {
  34. public:
  35.    short   fInRefNum, fOutRefNum;  // port reference numbers
  36.    SPortSel    fWhichPort;
  37.  
  38.    virtual pascal OSErr       ISerialPort  ( SPortSel whichPort, short theSpeed );
  39.    virtual pascal void     ClearPort    ();
  40.    virtual pascal Boolean   GetChars     ( char *c, long *countPtr );
  41.    virtual pascal OSErr       PutChars   ( char *c, long count );
  42.    virtual pascal void     ClosePort    ();
  43. };
  44.  
  45.  
  46. I THEN DECLARED A SPECIALIZED SERIAL OBJECT
  47.  
  48.  
  49. // ==================================================================
  50. class TMySerialPort: public TSerialPort {
  51.  
  52. public:
  53.  
  54.    pascal virtual Boolean  PutCommand( char command, long parameter );
  55.    pascal virtual Boolean  GetCommand( char command, long result );
  56.  
  57. private:
  58.  
  59. };
  60.  
  61.  
  62. I THEN GET THE FOLLOWING LINK ERRORS:
  63.  
  64. ### Link: Error: Undefined entry, name: (Error 28) "ClearPort__11TSerialPort"
  65.   Referenced from: __vtbl__13TMySerialPort in file:
  66. HD:cpgms:C++pgms:SerialTest:.Debug Files:Udialogs.cp.o
  67. ### Link: Error: Undefined entry, name: (Error 28) "ClosePort__11TSerialPort"
  68.   Referenced from: __vtbl__13TMySerialPort in file:
  69. HD:cpgms:C++pgms:SerialTest:.Debug Files:Udialogs.cp.o
  70.  
  71. NOTE THAT THE GENERAL OBJECT WAS WORKING IN ANOTHER PROGRAM I WROTE.  THE
  72. PROBLEM OCCURRED WHEN I CREATED THE SECOND OBJECT.
  73.  
  74. AS YOU CAN SEE I'M GETTING ERRORS ON THE ClearPort and ClosePort METHODS, THESE
  75. ARE THE ONLY TWO METHODS I DON'T CALL IN THE PROGRAM.  I USED TO GET AN ERROR
  76. FOR GetChars UNTIL I MADE A CALL TO IT.
  77.  
  78. ANY IDEAS??!!??
  79.  
  80.